Skip to content

ci: Exclude build tooling (resources/) from coverage#10561

Merged
mtrezza merged 2 commits into
parse-community:alphafrom
dblythy:ci/exclude-resources-coverage
Jul 20, 2026
Merged

ci: Exclude build tooling (resources/) from coverage#10561
mtrezza merged 2 commits into
parse-community:alphafrom
dblythy:ci/exclude-resources-coverage

Conversation

@dblythy

@dblythy dblythy commented Jul 5, 2026

Copy link
Copy Markdown
Member

Issue

resources/buildConfigDefinitions.js is a build-time codegen tool (run via npm run definitions), not shipped runtime code. It's currently measured for coverage at ~19% (158 uncovered lines), which drags the project coverage number down for something that isn't part of the product.

Approach

Exclude resources/** from nyc instrumentation. The bulk of the file is the codegen pipeline plus the file-read/write block guarded by if (require.main === module), which only runs on direct execution and can't be exercised by the test suite (the module only exports mapperFor). Excluding build tooling from coverage is standard practice and reflects the project number on product code only.

Tasks

  • Add tests

Summary by CodeRabbit

  • Chores
    • Updated coverage configuration to exclude files in the resources directory from coverage results.

resources/buildConfigDefinitions.js is a build-time codegen tool, not
shipped runtime code. Its generation pipeline only runs on direct
execution (require.main === module), so it can't be exercised by the test
suite, and it only exports mapperFor. Measuring it reports ~19% and drags
the project coverage number down for code that isn't part of the product.
Exclude resources/** from nyc instrumentation.
@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The .nycrc coverage configuration now excludes files matching resources/** in addition to files under spec directories.

Changes

Coverage configuration

Layer / File(s) Summary
Add resources coverage exclusion
.nycrc
The exclude list adds the resources/** glob alongside the existing **/spec/** exclusion.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: moumouls


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Engage In Review Feedback ❌ Error The branch has a single coverage-only commit and no repo evidence of review-comment discussion or follow-up addressing feedback. Engage the reviewer in the PR comments, then either apply a follow-up commit or get the reviewer to retract the feedback before resolving it.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required ci: prefix and clearly matches the coverage exclusion change.
Description check ✅ Passed The description covers Issue, Approach, and Tasks, matching the template well enough despite missing the optional Pull Request boilerplate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Check ✅ Passed Only change is adding resources/** to .nycrc excludes; no runtime or security-sensitive code changed, so no vulnerability pattern is introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.55%. Comparing base (6f3e07c) to head (633fc28).
⚠️ Report is 1 commits behind head on alpha.

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha   #10561      +/-   ##
==========================================
+ Coverage   92.69%   93.55%   +0.85%     
==========================================
  Files         193      192       -1     
  Lines       17027    16832     -195     
  Branches      248      248              
==========================================
- Hits        15784    15747      -37     
+ Misses       1222     1064     -158     
  Partials       21       21              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dblythy
dblythy requested review from a team and Moumouls July 20, 2026 09:52
@mtrezza

mtrezza commented Jul 20, 2026

Copy link
Copy Markdown
Member

@dblythy Please let CR review first before requesting a human review, thanks.

@mtrezza
mtrezza removed the request for review from a team July 20, 2026 10:52
@dblythy

dblythy commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mtrezza
mtrezza merged commit 5838c07 into parse-community:alpha Jul 20, 2026
20 of 22 checks passed
@dblythy

dblythy commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

Thanks @mtrezza 🤩

@dblythy
dblythy deleted the ci/exclude-resources-coverage branch July 20, 2026 23:50
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.10.1-alpha.4

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants